/*
 *  前期报审表 单字段维护
 *  初始化基础字段 formItems
 *  其他修改根据项目Id配置 (formItems+'项目Id),配置一份
 * */

const object = {
    // 铁科院
    formItems: [
        {
            name: "reportNo",
            type: "input",
            label: "编号：",
            required: true,
        },
        {
            name: "parentProjName",
            type: "input",
            label: "建设项目名称：",
            typeIds: [10, 11], // 首件工程 10-11
        },
        {
            name: "stationSupMind",
            type: "input",
            isConfigLabel: true,
            label: "：",
            label10: "首件工程类型/名称：",
            label11: "首件工程类型/名称：",
            labelDef: "工程名称：", // 默认值
            typeIds: [
                2, 3, 4, 5, 47, 48, 49, 50, 51, 10, 11, 12, 13, 14, 15, 57, 16, 29, 30, 31, 32, 52,
                58,
            ], // 施工组织设计29-30-31-32-52,资质报审表2-3-4-5,首件工程10-11,大临验收47,48,49,50,51,人机料报审12-13-14-15-57,单位工程划分表 16, 作业指导书 58
            required: true,
        },
        {
            name: "projTypeName",
            type: "select",
            isConfigLabel: true,
            label: "",
            label7: "文件类型：", // 开工报告
            label8: "文件类型：", // 开工报告
            label9: "文件类型：", // 开工报告
            label10: "申请类型：", // 首件工程
            label11: "申请类型：", // 首件工程
            labelDef: "报审类型：", // 默认值
            required: true,
            typeIds: [2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 57, 29, 30, 31, 32, 52], // 施工组织设计29-30-31-32-52，资质报审表2-3-4-5,开工报告7-8-9,首件工程10-11，人机料报审12-13-14-15-16

            props: {
                optionsName: "options", //option字段
                changeFunc: "projTypeIdChange", //回调
                changeField: "projTypeId",
            },
        },
        {
            name: "projTypeName",
            type: "select",
            isConfigLabel: true,
            typeIds: [47, 48, 49, 50, 51], // 大临验收47,48,49,50,51,
            label: "",
            labelDef: "验收类型：", // 默认值
            required: true,

            props: {
                optionsName: "options", //option字段
                changeFunc: "projTypeIdChange", //回调
                changeField: "projTypeId",
            },
        },
        {
            name: "buildOrg",
            type: "select",
            isConfigLabel: true,
            label: "：",
            label15: "是否上报建设单位：",
            label29: "是否为超一定规模的危险性较大的分部分项工程专项施工方案：",
            label52: "是否上报建设单位：",
            labelDef: "验收类型：", // 默认值
            required: true,
            typeIds: [15, 29, 52], // 施工组织设计29-30-31-32-52，人机料报审12-13-14-15-57，
            props: {
                optionsName: "buildOrgOptions", //option字段
                changeFunc: "changeBuildOrg", //回调
                changeField: "buildOrgId",
            },
        },
        {
            name: "projName",
            type: "select",
            isConfigLabel: true,
            label: "：",
            label48: "合同标段：",
            labelDef: "标段：", // 默认值
            props: {
                type: "selectPact",
                changeFunc: "selectPact",
                changeField: "projId",
            },
        },
        {
            name: "consName",
            type: "select",
            isConfigLabel: true,
            label: "：",
            label11: "项目公司：",
            labelDef: "建设单位：", // 默认值
            typeIds: [2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15, 57], // 资质报审表2-3-4-5，开工报告7-8-9,首件工程10-11，人机料报审12-13-14-15-57

            props: {
                type: "selectOrg",
                changeFunc: "selectConsName",
                pactType: "020",
                changeField: "consId",
            },
        },
        {
            name: "monitorName",
            type: "select",
            isConfigLabel: true,
            label: "：",
            label11: "监理单位：",
            labelDef: "项目监理机构：", // 默认值
            typeIds: [
                2, 3, 4, 5, 11, 47, 49, 50, 51, 7, 8, 9, 12, 13, 14, 15, 57, 16, 29, 30, 31, 32, 52,
                58,
            ], // 资质报审表2-3-4-5,,大临验收47,48,49,50,51,开工报告7-8-9,首件工程11，人机料报审12-13-14-15-57,单位工程划分表 1,6,施工组织设计29-30-31-32-52，作业指导书 58

            props: {
                type: "selectOrg",
                changeFunc: "selectMontorName",
                pactType: "015",
                changeField: "monitorId",
            },
        },
        {
            name: "measureOrg",
            type: "select",
            isConfigLabel: true,
            label: "",
            label11: "施工单位：",
            label10: "单位名称：",
            label48: "申请单位：",
            labelDef: "施工单位：",
            typeIds: [10, 11, 48, 58], //作业指导书 58 ,首件工程10-11, 大临验收47,48,49,50,51,
            props: {
                type: "selectOrg",
                changeFunc: "selectMeasureOrgName",
                pactType: "030",
                changeField: "measureOrgId",
            },
        },
        {
            name: "pName",
            type: "input",
            label: "拌合站名称：",
            typeIds: [48], // 大临验收47,48,49,50,51,
            required: true,
        },
        {
            name: "measureOrgUser",
            type: "input",
            label: "联系人：",
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "measureOrgContract",
            type: "input",
            label: "联系电话：",
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "pegMark",
            type: "input",
            isConfigLabel: true,
            label2: "检定单位：",
            label5: "分包单位：",
            label10: "起止里程：",
            label11: "起止里程及规模：",
            labelDef: "桩号：",
            typeIds: [2, 5, 10, 11], // 资质报审表2-3-4-5,首件工程10-11

            required: true,
        },
        {
            name: "pactName",
            type: "select",
            label: "开工标段：",
            typeIds: [7], //  开工报告7-8-9,

            required: true,
            props: {
                type: "selectPact",
                changeFunc: "changePactName",
                pactType: "030",
                changeField: "pactId",
            },
        },
        {
            name: "wbsName",
            type: "select",
            label: "工点名称：",
            required: true,
            typeIds: [9, 10], //  开工报告7-8-9, 首件工程10-11
            props: {
                type: "selectWbs",
                changeFunc: "changeWbsName",
                changeField: "wbsId",
                editabled: true,
            },
        },
        {
            name: "bpegMark",
            type: "input",
            isConfigLabel: true,
            label: "",
            label4: "委外试验机构：",
            label5: "合同条款：",
            label8: "单位工程：",
            label13: "拟用部位：",
            label29: "方案名称：",
            label30: "报审工程：",
            label31: "报审工程：",
            label32: "报审工程：",
            label52: "报审工程：",
            labelDef: "组织设计工程：", // 默认值
            typeIds: [4, 5, 8, 13, 29, 30, 31, 32, 52], //资质报审表2-3-4-5，开工报告7-8-9,人机料报审12-13-14-15-57, 施工组织设计29-30-31-32-52

            required: true,
        },
        {
            name: "pegMethod",
            type: "input",
            label: "桥跨形式：",
            typeIds: [10], //首件工程10-11
            required: true,
        },
        {
            name: "cellName",
            type: "input",
            isConfigLabel: true,
            label: "：",
            label13: "原材料：",
            label58: "作业指导书：",
            labelDef: "验收工作：",
            typeIds: [13, 47, 49, 50, 51, 58], //大临验收47,48,49,50,51，人机料报审12-13-14-15-57,作业指导书 58
            required: true,
        },
        {
            name: "planstartDate",
            type: "date",
            label: "申请开工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [7, 8, 9], //开工报告7-8-9,
            required: true,
        },
        {
            name: "planstartDate",
            type: "date",
            label: "开工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [10, 11], // 首件工程10-11
            required: true,
        },
        {
            name: "planendDate",
            type: "date",
            label: "完工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [10, 11], // 首件工程10-11
            required: true,
        },
        {
            name: "cdate",
            type: "date",
            props: {
                format: "YYYY-MM-DD",
            },
            isConfigLabel: true,
            label: "申请评估日期",
            label13: "进场日期：",
            label16: "报审日期：",
            label10: "自评完成日期：",
            label11: "申请评估日期：",
            labelDef: "申请评估日期：",
            typeIds: [10, 11, 13], // 首件工程 10-11,人机料报审12-13-14-15-57, 单位工程划分表16
            required: true,
        },
        {
            name: "respUserName",
            type: "input",
            label: "填写人：",
            required: true,
        },
        {
            name: "applyDate",
            type: "date",
            label: "填写日期：",
            // useDefTimeObj:new Date(), //使用默认new Date()时间
            props: {
                format: "YYYY-MM-DD",
            },
            required: true,
        },
        {
            name: "consMind",
            type: "input",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label10: "标准化管理自评结论：",
            labelDef: "",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "consMind",
            type: "input",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label11: "首件工程选取、完成情况综述：",
            labelDef: "",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [11], // 首件工程10-11
        },
        {
            name: "natureText",
            type: "input",
            width: "100%",
            label: "质量记录自评结论：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "opinionsText",
            type: "input",
            width: "100%",
            label: "资源配置自评结论：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "measureText",
            type: "input",
            width: "100%",
            label: "实体质量自评结论：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [10], // 首件工程10-11
            required: true,
        },
        {
            name: "mainWork",
            type: "input",
            width: "100%",
            label: "申请说明：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            hiddenTypeIds: [48], //大临验收47,48,49,50,51，
        },
        {
            name: "remarkWork",
            type: "input",
            width: "100%",
            label: "备注说明：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
        },
        {
            name: "subTable",
            type: "custom",
            width: "100%",
            isConfigLabel: true,
            label: "",
            lebel5: "分包工程报审",
            lebel12: "主要人员报审",
            lebel14: "进场施工、机械报审",
            lebel57: "进场施工、机械报审",
            labelDef: "明细表：",
            typeIds: [5, 12, 14, 57], //资质报审表2-3-4-5 ，人机料报审12-13-14-15-57
        },
    ],
};

const rformItems = function (isVue, projId) {
    const formItemsFiled = projId && `formItems${projId}`;
    if (object[formItemsFiled]) {
        return object[formItemsFiled];
    } else {
        return object[`formItems`];
    }
};

export default rformItems;
